function lazyload(){
    let contentHeight =window.innerHeight || document.documentElement.clientHeight;
    let scrollHeight =document.body.scrollTop || document.documentElement.scrollTop;
    let allHeight = contentHeight + scrollHeight;
    let imgObj = document.querySelectorAll('img');
    imgObj.forEach((item,i)=>{
        if(item.offsetTop<allHeight){
            item.src=item.getAttribute('src-real');
        }
    }) 
}
lazyload();
window.onscroll = function () {
  lazyload();
};